package com.loan.web.api;

import com.loan.entity.Company;
import com.loan.entity.ResponseResult;
import com.loan.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description:评估公司控制器
 * @Author:l
 * @Date:2022.01.18
 */
@RestController
@RequestMapping("/api/company")
public class CompanyController {
    @Autowired
    private CompanyService companyService;

    /**
     * 获取评估公司列表
     * @return
     */
    @RequestMapping("/list")
    public ResponseResult<List<Company>> list(){
        List<Company> companies = companyService.list();
        return new ResponseResult<>(companies);
    }
}
